Add a trivial implementation of the new apis
authorMatthias Clasen <mclasen@redhat.com>
Sat, 7 Jan 2012 05:38:57 +0000 (00:38 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 7 Jan 2012 08:20:56 +0000 (03:20 -0500)
For non-X11, this is just a placeholder until we get around
to moving the EggSMClient implementations over.

gtk/gtkapplication.c

index f5826a8f52db0d8755335e1deb3e99ce6908ef6d..4705c250e3f1c025bdf374f923a6fd75282e03b6 100644 (file)
@@ -1444,6 +1444,54 @@ gtk_application_end_session (GtkApplication         *application,
                          NULL, NULL, NULL);
       break;
     }
+
+#else
+
+/* Trivial implementation.
+ *
+ * EggSMClient has working Win32 and OSX implementations of
+ * ::quit-requested, ::quit, ::quit-cancelled that should be
+ * copied here eventually.
+ *
+ * For the inhibit API, see
+ * http://msdn.microsoft.com/en-us/library/ms700677%28VS.85%29.aspx
+ */
+
+void
+gtk_application_quit_response (GtkApplication *application,
+                               gboolean        will_quit,
+                               const gchar    *reason)
+{
+}
+
+guint
+gtk_application_inhibit (GtkApplication             *application,
+                         GtkWindow                  *window,
+                         GtkApplicationInhibitFlags  flags,
+                         const gchar                *reason)
+{
+  return 0;
+}
+
+void
+gtk_application_uninhibit (GtkApplication *application,
+                           guint           cookie)
+{
+}
+
+gboolean
+gtk_application_is_inhibited (GtkApplication             *application,
+                              GtkApplicationInhibitFlags  flags)
+{
+  return FALSE;
+}
+
+gboolean
+gtk_application_end_session (GtkApplication         *application,
+                             GtkApplicationEndStyle *style,
+                             gboolean                request_confirmation)
+{
+  return FALSE;
 }
 
 #endif